package com.guigu.qingcheng.service;

import com.qingcheng.entity.PageResult;
import com.qingcheng.entity.Result;
import com.qingcheng.pojo.order.Order;
import com.qingcheng.vo.goods.OrderListVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

@Component
@FeignClient("service-order")
public interface OrderFegin {

    @PostMapping("/orders/order/saveOrder")
    Map<String,Object> saveOrder(@RequestBody Order order,@RequestParam String username);

    @PostMapping("/orders/order/findOrderList")
    PageResult<OrderListVo> findOrderList(@RequestParam int page, @RequestParam int size,@RequestParam String orderStatus,@RequestParam String username);

    @GetMapping("/orders/order/orderMessage")
    Result orderMessage(@RequestParam String orderId,@RequestParam String status);

    @GetMapping("/orders/order/returnOrder2")
    Result returnOrder2(@RequestParam String orderId,@RequestParam String type);
}
